package com.miniprogram.common.config;

import com.miniprogram.common.tools.AliyunOSSUploader;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

@EnableConfigurationProperties(AliyunOSSProperty.class)
public class AliyunOSSConfig {

    @Autowired
    private AliyunOSSProperty aliyunOSSProperty;

    @Bean
    public AliyunOSSUploader aliyunOSSUploader() {
        return new AliyunOSSUploader(aliyunOSSProperty);
    }

}
